//
//  ViewController.m
//  tarbarTest
//
//  Created by Joinwe on 15/12/8.
//  Copyright © 2015年 Joinwe. All rights reserved.
//

#import "ViewController.h"
#import "DCViewController.h"

#define kDiviceSize [UIScreen mainScreen].bounds.size

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //    适应
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor = [UIColor redColor];
    
    
    
    UIButton *pushButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 20, kDiviceSize.width - 40, 40)];
    pushButton.backgroundColor = [UIColor greenColor];
    [pushButton setTitle:@"PUSH" forState:UIControlStateNormal];
    [pushButton addTarget:self action:@selector(pushAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:pushButton];
    
}


- (void)pushAction{
    [self.navigationController pushViewController:[DCViewController new] animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
